
<!DOCTYPE html>
<html>
<head>
<title>个人信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport"
	content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

<meta name="format-detection" content="telephone=no" />
<link rel="stylesheet" href="/Public/css.css" />
<script src="/Public/js/jquery-1.12.3.min.js"></script>
<script src="/Public/js/ajaxService.js"></script>
<script src="/Public/js/common.js"></script>

<include file="common:server_config" />
</head>
<body id="register" promoter_id='{$promoter_en.promoter_id}'>
	<script type="text/javascript">
	(function() {
		document.documentElement.style.fontSize = (document.body.offsetWidth / 320)
				* 14 + 'px';
	})()
</script>
	<div class="header">
		<a href="javascript:history.back(-1);" class="backbtn_02"></a>个人信息
	</div>

	<div class="registerbox">
		<div class="dt">
			<i></i>请更新信息
		</div>
		<div class="re_form">
			<label for="">手机</label><input value="{$curr_promoter_en.cellphone}" id="cellphone" type="text" placeholder="请输入真实手机号码" />
		</div>
		<div class="re_form">
			<label for="">性别</label>
			
			<span style="font-size:1rem;" class=""><input type="radio" id="sex_man" class="checkbtn"  name="sex" value="1">男 </span><span style="font-size:1rem;"><input type="radio" id="sex_woman" class="checkbtn" name="sex" value="2">女</span>
			
		</div>
		<div class="re_form">
			<label for="">姓名</label><input value="{$curr_promoter_en.real_name}" id="real_name" type="text" placeholder="请输入真实姓名" />
		</div>
		<div class="re_form">
			<label for="">省市区</label> <select id="ssl_province"
				style="width: 4rem; font-size: 0.7rem;">

			</select> <select id="ssl_city" style="width: 4rem; font-size: 0.7rem;">

			</select> <select id="ssl_district" style="width: 4rem; font-size: 0.7rem;">

			</select>
		</div>
		<div class="re_form">
			<label for="">地址</label><input value="{$curr_promoter_en.address}" id="address" type="text" placeholder="请输入详细地址" />
		</div>
		<div class="re_form">
			<label for="">支付宝帐号</label><input value="{$curr_promoter_en.alipay_id}"  id="alipay_id" type="text" placeholder="提现帐户 可更改" />
		</div>
		<div class="re_form">
			<label for="">支付宝实名</label><input value="{$curr_promoter_en.alipay_name}"  id="alipay_name" type="text" placeholder="与支付宝账户对应"/>
		</div>
		<div class="re_form">
			<label for="">身份证</label><input value="{$curr_promoter_en.id_card_no}" id="id_card_no" type="text" placeholder="请如实填写" />
		</div>


		<div class="re_form last_form">
			<label for="">营业执照</label><input value="{$curr_promoter_en.business_license_no}" id="business_license_no" type="text" placeholder="如有则填写" />
		</div>
		<div class="loginact">
			<a href="javascript:;" class="hbtn" id="btn_submit">更   新</a>
		</div>
	</div>
</body>
<script src="/Public/js/ajaxService.js"></script>
<script src="/Public/js/common.js"></script>
<script type="text/javascript">
var curr_promoter_en = eval({$curr_promoter_en_json});

PromoterInfoPage = {
		//填充界面元素
		'PageInit': function(){
			//性别选择
			if(curr_promoter_en.sex == 1){
				$('#sex_man').attr("checked", "checked");
			}
			else{
				$('#sex_woman').attr("checked", "checked");
			}
			
			//省市区
			var province_id = curr_promoter_en.province_id;
			var city_id = curr_promoter_en.city_id;
			var district_id = curr_promoter_en.district_id;
			
			$('#ssl_province').val(province_id);
			$('#ssl_province').trigger('change');
			$('#ssl_city').val(city_id);
			$('#ssl_city').trigger('change');
			$('#ssl_district').val(district_id);
		},
		
		
};

$(document).ready(function(){
	
	CommonUtil.InitRegion();
	PromoterInfoPage.PageInit();
	
	$('.hbtn').bind('click', function(){
		var param_en = {};
		param_en.promoter_id= $("#register").attr('promoter_id');
		param_en.cellphone 	= $("#cellphone").val();
		param_en.sex 		= $("input[name='sex']:checked").val();
		param_en.real_name 	= $("#real_name").val();
		param_en.district_id= $("#ssl_district").val();
		param_en.address 	= $("#address").val();
		param_en.alipay_id 	= $("#alipay_id").val();
		param_en.alipay_name 	= $("#alipay_name").val();
		param_en.id_card_no = $("#id_card_no").val();
		param_en.business_license_no = $("#business_license_no").val();
		
		var result = PromoterService.UpdateInfo(param_en);
		if(result.IsSuccess == 0){
			alert(result.ErrorMsg);
			return;
		}
		else{
			alert('修改成功');
		}
	});
	
});
</script>

</html>